var pool = require('../dao/dbConnect.js');

var logger = require('../base/log.js')('err');

var isbn = {
	insert: function(insertValue,callback){
		pool.getConnection(function(err,connection){
			if(err){
				logger.error(err);
			
			}

			var insert = 'INSERT INTO isbn SET ?';
			connection.query(insert,insertValue,function(err,results){
				if(err){
					logger.error(err);
					results = "error";
				
				}
				connection.release();
				if(callback){
					callback(results);
				}
			});
		});
	},

};


module.exports = isbn;